package info.maxhis.bn.birthday;

import info.maxhis.bn.R;
import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;

public class SearchBirthdayActivity extends TabActivity {
	private TabHost tabHost;
	private Resources rs;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		rs = getResources();
		Window window = getWindow();
//		window.requestFeature(Window.FEATURE_CUSTOM_TITLE);
		window.setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title);
		setTitle(R.string.title_search);
		
//		setContentView(R.layout.activity_search_birthday);
//		tabHost = (TabHost) findViewById(R.id.tab_search);
		tabHost = getTabHost();
		//根据时间查找Tab
		tabHost.addTab(tabHost.newTabSpec("tab1")
                .setIndicator(rs.getString(R.string.search_by_date),rs.getDrawable(R.drawable.search2))
                .setContent(new Intent(this, SearchByDateActivity.class)));
		//根据名字查找Tab
		tabHost.addTab(tabHost.newTabSpec("tab2")
                .setIndicator(rs.getString(R.string.search_by_name),rs.getDrawable(R.drawable.search))
                .setContent(new Intent(this, SearchByNameActivity.class)));
	}
}
